<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'dorm.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="Huang">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css" href="style/inf.css">

<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/inf.js"></script>

</head>

<body onload="loadDormBdName('#dormBdName');" style="background-color: transparent;">
	<h1>宿舍管理：</h1>
	楼号：
	<select id="dormBdName" size="1" name="dormName"
		onchange="loadDormNu('#dormNu', '#dormBdName', true);">
	</select> 楼层：
	<select id="dormNu" size="1" name="dormNu"></select>
	

	
	<input type="button" value="查询" onclick="loaddorm(1);"></input>
    <input type="button" value="添加" onclick="addDormInf(1);" ></input>	
    <table id="inftable" border="1" bordercolor="#000000">
      <tr id="ttitle">
       <th scope="col">楼号</th>
       <th scope="col">宿舍号</th>
       <th scope="col">居住人数上限</th>
       <th scope="col">已住人数</th>
       <th scope="col">电话</th>
       <th scope="col">操作</th>
       </tr>
      </table>
      
      <!-- 翻页控件  -->
	<div id="changePage">
		<a href="javascript:void(0)" class="previous">上一页</a> <select
			id="page_select"></select> <a href="javascript:void(0)" class="next">下一页</a>
	</div>
	
	
	<!-- 新增宿舍信息对话框  -->
	<div id="newdorm_div" class="addDialog">
	<input type="hidden" id="uid"><!-- 用来存放修改宿舍信息 -->
	  <div id="dorm_l">
	    <p>

				楼号：<select id="dormName_add"
					onchange='loadDormNu("#dormNu_add", "#dormName_add");'></select>
				宿舍号：<select id="dormNu_add"></select>
			</p>
		                         居住人数上限：<input type="text" id="maxNuOfPp"/><!--id 还为命名  -->
			     
	  </div>
	  
	  <div id="dorm_r">
	  
	       已住人数上限：<input type="text" id="nuOfPp"/><!-- id还为命名 -->
	    
	   电话号码：<input type="text" id="dormTelephone"><!-- id还为命名 -->
<!--    ID：<input type="text" id="ID_add"> -->
	  </div>
	 
	  
	  <div>
	  <input type="button" id="close" value="关闭" onclick="hideAddDormInf();"/></div>
	
	  <div>
	 <input type="button" id="edit_save" class="save" value="保存" onclick="editDorm()"/>
	 <input type="button" id="add_save" class="save" value="保存" onclick="addDorm()"/> 
	 </div>
  </div>